package cn.texous.demo.dmqs.schdule;

import cn.texous.demo.dmqs.producer.NsqProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * insert description here
 *
 * @author Showa.L
 * @since 2019/8/6 16:55
 */
@Component
public class NsqProducerSchedule {

    @Autowired
    private NsqProducer nsqProducer;

    @Scheduled(fixedDelay = 30000)
    public void nsqProducer() {
        nsqProducer.send("{\"id\":70}");
    }

}
